import rclpy
from rclpy.node import Node

class Myparam(Node):
    def __init__(self):
        super().__init__("my_param_node_py")
        self.get_logger().info("参数API使用(python)")
        p1=rclpy.Parameter("car_name",value="Tiger")
        p2=rclpy.Parameter("wideth",value="1.5")
        p3=rclpy.Parameter("wheels",value="5")

        self.get_logger().info(f"car_name={p1.value}")
        self.get_logger().info(f"wideth={p2.value}")
        self.get_logger().info(f"wheels={p3.value}")

        self.get_logger().info(f"key={p1.name}")

def main():
    rclpy.init()
    rclpy.spin(Myparam())
    rclpy.shutdown()

if __name__=='__main__':
    main()    
